﻿@model Lion.WeiXin.Core.Models.RoleModel
@{
    ViewBag.Title = "Show";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section ChildPageJs {
    <script src="/Scripts/App_Scripts/RoleShow.js" type="text/javascript"></script>
}
<form id="fmSave" name="fmSave">
    <div class="titstyle01 clearfix">
        <strong>编辑角色</strong>
    </div>
    <div class="boxstyle01 clearfix pt25 pb10 pl10">
        <div class="ml30 pl10">
            <span class="cf60">*</span><lable>角色名称：</lable>
            <input type="text" id="RoleName" name="RoleName" value="@Model.RoleName" class="ml20"  />
            <input type="hidden" id="AID" name="AID" class="ml20" value="@Model.AID"  />
        </div>
        <div class="ml30 pl10 pt10 t_l">
            <span class="cf60">*</span><lable>角色备注：</lable>
            <textarea style="width: 50%; height: 50px;" cols="10" rows="20" id="Remark" name="Remark">@Model.Remark</textarea>
        </div>
        <div id="tabsAudit" class="boxstyle01 " style="white-space: normal; height: 100%;">
            <table id="TableList" width="100%" border="0" cellspacing="0" cellpadding="0" class="clear tabshyle06">
                <thead>
                    <tr bgcolor="#e0ecf2">
                        <th width="100px">
                            <strong class="c05a">菜单</strong>
                        </th>
                        <th>
                            <strong class="c05a">权限点</strong>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="templateContentRow" style="display: none;">
                        <td class="fs14 b t_c"></td>
                        <td></td>
                    </tr>
                    <!---->
                    @foreach (Lion.WeiXin.Core.Models.CmsMenuModel item in Model.Menus.Where(m=>m.Code.Length==6))
                    {
                        <tr class="templateContentRow" style="">
                            <td class="fs14 b t_c">
                                <!--一级菜单-->
                                <label>@Html.CheckBox(@item.AID.ToString(), @item.IsCurrentRole, new { onclick="SelectChildItems(this)",@value=item.AID})@item.Title</label>                                
                            </td>
                                <!--二子级菜单-->
                            <td>
                                <dl class="clearfix">
                                    @foreach (Lion.WeiXin.Core.Models.CmsMenuModel childItem in Model.Menus.Where(m => m.Code.IndexOf(item.Code) == 0&&m.Code.Length==9))
                                    {   
                                        <dt>
                                            <label id="parent">@Html.CheckBox(@childItem.AID.ToString(), @childItem.IsCurrentRole, new { onclick = "SelectParentItem(this)",@value=childItem.AID })@childItem.Title</label>
                                               <!--三级子级菜单-->
                                            <ul class="uf_l ml10">
                                            @foreach(Lion.WeiXin.Core.Models.CmsMenuModel thirdItems in  Model.Menus.Where(m => m.Code.IndexOf(childItem.Code) == 0&&m.Code.Length==12))
                                            {
                                                <li >
                                                     <label id="thirdItem">@Html.CheckBox(@thirdItems.AID.ToString(), @thirdItems.IsCurrentRole, new { onclick = "SelectPreParentItem(this)",@value=thirdItems.AID })@thirdItems.Title</label>
                                                </li>
                                            }
                                             </ul>
                                        </dt>
                        
                                    }
                                </dl>
                            </td>
                        </tr>
                    }
                    <!---->
                </tbody>
            </table>
        </div>
        <div class="ml30 pl10">
            <input type="button" value="确 定" class="btn02 f_l m15" id="btnSave" />
            <input type="button" class="btn02 f_l m15" id="btnCancel" value="取 消" />
        </div>
    </div>
</form>
